﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ES.Shared.Data
{
    [Serializable]
    public class KeyInfo
    {
        public KeyInfo()
        {
            _keyColumns = new KeyColumnInfoCollection();
        }

        public KeyInfo(string keyName, KeyType indexType, KeyColumnInfo[] indexColumns) : this()
        {
            KeyName = keyName;
            KeyType = indexType;
            _keyColumns.AddRange(indexColumns);
        }

        public string KeyName
        {
            get;
            set;
        }

        public KeyType KeyType
        {
            get;
            set;
        }

        private KeyColumnInfoCollection _keyColumns;
        
        public KeyColumnInfoCollection KeyColumns
        {
            get { return _keyColumns; }
        }
    }
}
